package javax.realtime;

import java.util.BitSet;

public final class RealtimeSystem {

	public static final byte BIG_ENDIAN = 1;
	public static final byte LITTLE_ENDIAN = 0;
	public static final byte BYTE_ORDER = java.nio.ByteOrder.nativeOrder().equals(java.nio.ByteOrder.BIG_ENDIAN)?BIG_ENDIAN:LITTLE_ENDIAN;
	
	private static RealtimeSecurity securityManager = new RealtimeSecurity();
		
	public static GarbageCollector currentGC()
	{
		//TODO: stub
		return new GarbageCollector() {
			
			@Override
			public RelativeTime getPreemptionLatency() {
				return new RelativeTime(Long.MAX_VALUE, 0);
			}
		};
	}
	public static int getConcurrentLockUsed()
	{
		//TODO: stub
		return 0;
	}
	public static MonitorControl getInitialMonitorControl()
	{
		//TODO: stub
		return null;
	}
	public static int getMaximumConcurrentLocks()
	{
		//TODO: stub
		return 0;
	}
	public static RealtimeSecurity getSecurityManager()
	{
		return securityManager;
	}
	public static void setMaximumConcurrentLocks(int numLocks)
	{
		//TODO: stub
	}
	public static void setMaximumConcurrentLocks(int number, boolean hard)
	{
		//TODO: stub
	}
	public static void setSecurityManager(RealtimeSecurity manager)
	{
		//TODO: stub
	}
	
	public static BitSet availableProcessors()
	{
		BitSet processors = new BitSet(Runtime.getRuntime().availableProcessors());
		processors.set(0, processors.length() - 1);
		return processors;
	}
}
